import java.io.*;
import java.util.*;
import java.util.concurrent.*;
public class UrlFactory {
	
	public static ArrayList<String> getArrayUrls (String filename, int n){
		ArrayList<String> ulrs = new ArrayList<String>();
		try{
			BufferedReader br = new BufferedReader (new FileReader(filename));
			for (int i = 0; i<n; i++){
				String line = "http://" + br.readLine();
		//		String line =  br.readLine();
				ulrs.add(line );
				
			}
		}catch(IOException e){
			e.printStackTrace();
		}
		
		return ulrs;
	}
	
	public static LinkedBlockingQueue<String> getQueueUrls(String filename, int n){
		LinkedBlockingQueue<String> ulrs = new LinkedBlockingQueue<String>();
		
		try{
			BufferedReader br = new BufferedReader (new FileReader(filename));
			for (int i = 0; i<n; i++){
				String line = br.readLine();
				ulrs.add("http://www" +line);
			//	ulrs.add("http://www.google.co.nz" );
			}
		}catch(IOException e){
			e.printStackTrace();
		}
		
		return ulrs;
	}

}
